home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 41.zip / BS1 part 41 / Abacus diskdrives IO.adf / CH9 / read.s < prev    next >
Text File  |  1978-06-28  |  2KB  |  8 lines

  1. Device         = 350Port           = 36                       ;Offset for Drive 0RepPort        = 174SigTask        = 16Task           = 276FindName       = -276Number         = $397cTrack          = 20               move.l $4,a6            ;get ExecBase                lea Name,a1             ;set Pointer to Name                lea Device(a6),a0       ;Pointer to Device-List               jsr FindName(a6)        ;seek Trackdisk-Device                tst.l d0                ;Device found ?               beq Error               ;No, error
  2.                move.l Task(a6),a0      ;get Pointer to user Task               move.l d0,a6            ;Pointer to Task to A6               move.l Port(a6),a3      ;get Pointer to Drives-                                       ;Port (Drive 0)               lea RepPort(a3),a1      ;Pointer to RepPort
  3.                move.l SigTask(a1),-(a7);save Pointer to Task
  4.                move.l a1,-(a7)         ;save Pointer to RepPort               move.l a0,SigTask(a1)   ;enter user Task                bset #0,34(a3)          ;block Trackdisk-Task ; From here on starts the actual load routine               move.l #1,d0              ;Value for Motor on
  5.                jsr $fea462               ;switch Motor on
  6.                move.l #Track,d0          ;Track-Number to D0
  7.                move.w #Track,74(a3)
  8.                jsr $fea3da               ;move Head to position                move.l 78(a3),a0          ;Pointer to read buffer                move.l #Number,d0         ;Number of bytes to read                                          ;to D0               jsr $fea524               ;read Track                clr.l d0                  ;Value for Motor off                jsr $fea462               ;turn Motor off ; End of the load routine. The modified pointers must be ; restored again.               bclr #0,34(a3)              ;release Task again                move.l (a7)+,a1             ;get Pointer to Task                move.l (a7)+,SigTask(a1)    ;store again in PortError:        rts                          ;Return jumpName:          dc.b 'trackdisk.device',0               END